/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.cardarus.operatingsystem.domain;

import java.io.Serializable;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

/**
 * This class represents a User of the system.
 * For example a Clerk or a Customer
 *
 * @author Javier Snaider
 */
@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("SU")
public class SystemUser implements Serializable {
    /**
     * The id of the user
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    /**
     * The name of the user
     */
    private String name;
    /**
     * The family name of the user
     */
    private String familyName;
    /**
     * The phone number of the user
     */
    private String phone;
    /**
     * the email of the user
     */
    private String email;
    /**
     * The mail address of the user
     */
    private String address;
    /**
     * The username
     */
    private String userName;
    /**
     * The password of the user
     */
    private String password;

    /**
     * Default constructor
     */
    public SystemUser() {
    }

    /**
     * The SystemUser constructor
     *
     * @param id
     * @param name
     * @param familyName
     * @param phone
     * @param email
     * @param address
     * @param userName
     * @param password
     */
    public SystemUser(int id, String name, String familyName, String phone, String email, String address, String userName, String password) {
        this.id = id;
        this.name = name;
        this.familyName = familyName;
        this.phone = phone;
        this.email = email;
        this.address = address;
        this.userName = userName;
        this.password = password;
    }

    /**
     *
     * @return the id
     */
    public int getId() {
        return id;
    }
    /**
     * sets the id
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the familyName
     */
    public String getFamilyName() {
        return familyName;
    }

    /**
     * @param familyName the familyName to set
     */
    public void setFamilyName(String familyName) {
        this.familyName = familyName;
    }

    /**
     * @return the phone
     */
    public String getPhone() {
        return phone;
    }

    /**
     * @param phone the phone to set
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the address
     */
    public String getAddress() {
        return address;
    }

    /**
     * @param address the address to set
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * @return the userName
     */
    public String getUserName() {
        return userName;
    }

    /**
     * @param userName the userName to set
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }
}
